package br.com.orientacaoobjetos;
/**
 * Mesmo objetivo da classe Programa16
 * @author sidney.ferreira
 *
 */
class G{
	private Double d = 25.0;
	private Double e = 45.0;
	
	public String toString(){
		Double total = d + e;
		return "Total: " + total;
	}
}
class F extends G{
	private String saldo = "Saldo na Conta: ";
	
	public String toString(){
		return saldo + super.toString();
	}
}
public class Programa17 {
	public static void main(String[] args) {
		G g = new F();
		System.out.println(g.toString());
	}
}
